/**
 * Copyright (C) 2005-2011 by Insider Guides, LLC                       
 * info@framewerk.org                                                   
 *                                                                      
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the      
 * "Software"), to deal in the Software without restriction, including  
 * without limitation the rights to use, copy, modify, merge, publish,  
 * distribute, sublicense, and#or sell copies of the Software, and to   
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:                                            
 *                                                                      
 * The above copyright notice and this permission notice shall be       
 * included in all copies or substantial portions of the Software.      
 *                                                                      
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,      
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF   
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR    
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.                                      
 */
//Marks the right margin of code *******************************************************************
package com.rmc.utils
{
	
	//--------------------------------------
	//  Imports
	//--------------------------------------
	import flash.utils.describeType;
	
	
	//--------------------------------------
	//  Metadata
	//--------------------------------------
	
	//--------------------------------------
	//  Class
	//--------------------------------------
	/**
	 * <p>The <code>EnumUtil</code> class assists the <code>Enum</code> class. Only. 
   * It parses the class and adds a value for each property equal to the 
   * property name. (i.e. changes fun=null to fun=fun).</p>
	 * 
	 * <p>AUTHOR 		: Samuel Asher Rivello</p>
	 * <p>COMPANY 		: Rivello Multimedia Consulting</p>
	 * <p>CREATION DATE 	: Oct 08, 2010</p>
	 * 
	 * @example Here is a code example. 
	 *  
	 * <listing version="3.0">
	 * <p>Describe this code example.</p>
	 *
	 * </listing>
	 *
	 * CLASS VISIBILITY :  INTERNAL : YES, USERS : NO
	 * @private
	 * 
	 */	
	public class EnumUtil 
	{		
		
		//--------------------------------------
		//  Properties
		//--------------------------------------
		//PUBLIC GETTER/SETTERS
		
		//PUBLIC CONST
		
		//PRIVATE
		
		
		//--------------------------------------
		//  Constructor
		//--------------------------------------

		
		//--------------------------------------
		//  Methods
		//--------------------------------------		
		//PUBLIC	
		
		//PUBLIC STATIC
		/**
		 * Used for the custom Enum class so that  x = new Enum(); creates x.name = "x" automatically.  
		 * This name property faciliates debugging and use of that class. It is not used directly by developers.
		 * 
		 * @param classType The class to be initialized
		 * 
		 * @return void
		 * 
		 */
		public static function InitializeEnumClassType(classType :*) :void
		{
			var describeType_xml :XML = describeType(classType);
			for each (var constant_xml :XML in describeType_xml.constant) {
				classType[constant_xml.@name].name = constant_xml.@name;
			}
		}
		
		//PRIVATE	
		
		
		//--------------------------------------
		//  Event Handlers
		//--------------------------------------		

		
	}
}